import service from '@/utils/request'

// @Tags QmConfig
// @Summary 创建qmConfig表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.QmConfig true "创建qmConfig表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /qmConfig/createQmConfig [post]
export const createQmConfig = (data) => {
  return service({
    url: '/qmConfig/createQmConfig',
    method: 'post',
    data
  })
}

// @Tags QmConfig
// @Summary 删除qmConfig表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.QmConfig true "删除qmConfig表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /qmConfig/deleteQmConfig [delete]
export const deleteQmConfig = (params) => {
  return service({
    url: '/qmConfig/deleteQmConfig',
    method: 'delete',
    params
  })
}

// @Tags QmConfig
// @Summary 批量删除qmConfig表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除qmConfig表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /qmConfig/deleteQmConfig [delete]
export const deleteQmConfigByIds = (params) => {
  return service({
    url: '/qmConfig/deleteQmConfigByIds',
    method: 'delete',
    params
  })
}

// @Tags QmConfig
// @Summary 更新qmConfig表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.QmConfig true "更新qmConfig表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /qmConfig/updateQmConfig [put]
export const updateQmConfig = (data) => {
  return service({
    url: '/qmConfig/updateQmConfig',
    method: 'put',
    data
  })
}

// @Tags QmConfig
// @Summary 用id查询qmConfig表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.QmConfig true "用id查询qmConfig表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /qmConfig/findQmConfig [get]
export const findQmConfig = (params) => {
  return service({
    url: '/qmConfig/findQmConfig',
    method: 'get',
    params
  })
}

// @Tags QmConfig
// @Summary 分页获取qmConfig表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取qmConfig表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /qmConfig/getQmConfigList [get]
export const getQmConfigList = (params) => {
  return service({
    url: '/qmConfig/getQmConfigList',
    method: 'get',
    params
  })
}

export const uploadConfig = (data) => {
  return service({
    url: '/qmConfig/uploadConfig',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}
